package com.demo.rmi.server;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.rmi.RemoteException;
import java.rmi.server.UnicastRemoteObject;

public class HelloService extends UnicastRemoteObject implements HelloInterface {

    private static final Logger logger = LoggerFactory.getLogger(HelloService.class);

    public HelloService() throws RemoteException {
    }

    public String say(String name) throws RemoteException {
        logger.info("访问了");
        return name + "说了hello";
    }
}
